package com.zhuhanpeng.cloud.spring.util;

import org.springframework.util.DigestUtils;

public final class MD5Util {
    private  MD5Util(){



    }
    private  final  static String passwdKey="abc123456abc";


    public static String encode(CharSequence charSequence) {
        if (charSequence == null) {
            throw new IllegalArgumentException("charSequence cannot be null");
        }

        String rst = DigestUtils.md5DigestAsHex((charSequence + passwdKey).getBytes());
        return  rst;
    }


    public static void main(String[] args) {
        System.err.println(encode("123456"));
    }




}
